<html>
<head>
<meta http-equiv="content-type" content="text/html;charset={$meta_charset}">
<title>店舗選択</title>
<head>
{literal}
<script type="text/javascript">
<!--
function SendValue(paramTenpoNm){
	if (document.getElementById("TenpoNm").value == "") {
		alert("対象店舗を選択して下さい")
	}else{
		window.opener.document.forms[0].TenpoNm.value = document.getElementById("TenpoNm").value;
		window.opener.document.forms[0].ShopCd.value = document.getElementById("ShopCd").value;
		window.opener.document.forms[0].ClaimTgtKbn[1].checked = true;
		this.close();
	}
}
function setTenpoNm(){
	var paramTenpo = document.selectTenpoForm.shopCdSelect.selectedIndex;
	var tempoCd = document.selectTenpoForm.shopCdSelect.options[paramTenpo].value;
	var tenpoNm = document.getElementById("TENPO_NAME_" + tempoCd).value;
	document.getElementById("TenpoNm").value = tenpoNm;
	document.getElementById("ShopCd").value = tempoCd;
	document.getElementById("tenpo_name").innerHTML = tenpoNm;
}
function reSubmit(){
	var fm = document.getElementById("selectTenpoForm");
	document.getElementById("TenpoPrefCd").value = document.getElementById("prefCdSelect").value;
	var strParam = document.getElementById("TenpoPrefCd").value + '_' + document.getElementById("ShopCd").value;
	fm.action = '/inquiry/etcentry/selecttenpo?Param=' + strParam;
	fm.submit();
}
-->
</script>
{/literal}
</head>
<body bgcolor="#FFFFFF" text="#333333" leftmargin="0" topmargin="5" marginwidth="0" marginheight="5">
<center>
<form name="selectTenpoForm" id="selectTenpoForm" method="post" action="">
<input type="hidden" name="TenpoNm" id="TenpoNm"  value="{$paramarray.TenpoNm}">
<input type="hidden" name="TenpoPrefCd" id="TenpoPrefCd" value="{$paramarray.TenpoPrefCd}">
<input type="hidden" name="ShopCd" id="ShopCd" value="{$paramarray.ShopCd}">
<table align="center" border="1" cellpadding="5" cellspacing="2" width="180" bordercolor="#999999">
	<tr valign="top">
		<td align="center" valign="middle" bgcolor="#EEEEEE">都道府県選択<br />
<select name="prefCdSelect" id="prefCdSelect" onchange="javaScript:reSubmit();">
	<option value="" selected>選択して下さい</option>
{foreach from=$paramarray.prefList item=pref count=pref_count}
	{if $paramarray.TenpoPrefCd == $pref.M43_TODOUFUKEN_CD}
		<option value="{$pref.M43_TODOUFUKEN_CD}" selected>{$pref.M43_TODOUFUKEN}</option>
	{else}
		<option value="{$pref.M43_TODOUFUKEN_CD}">{$pref.M43_TODOUFUKEN}</option>
	{/if}
{/foreach}
</select>
		</td>
	</tr>
</table>
<br />
<table align="center" border="1" cellpadding="5" cellspacing="2" width="180" bordercolor="#999999">
	<tr valign="top">
		<td align="center" valign="middle" bgcolor="#EEEEEE">店舗選択<br />
<select name="shopCdSelect" id="shopCdSelect" onchange="javaScript:setTenpoNm();">
	<option value="">店舗を選択して下さい</option>
	{foreach from=$paramarray.shopList item=shop count=shop_count}
		{if $paramarray.ShopCd == $shop.M05_TENPO_CD}
			<option value="{$shop.M05_TENPO_CD}" selected>{$shop.M05_TENPO_NAME}</option>
		{else}
			<option value="{$shop.M05_TENPO_CD}">{$shop.M05_TENPO_NAME}</option>
		{/if}
	{/foreach}
</select>
{foreach from=$paramarray.shopList item=shop count=shop_count}
	<input type="hidden" name="TENPO_NAME_{$shop.M05_TENPO_CD}" id="TENPO_NAME_{$shop.M05_TENPO_CD}" value="{$shop.M05_TENPO_NAME}">
{/foreach}
		</td>
	</tr>
</table>
<br />
<table align="center" border="1" cellpadding="5" cellspacing="2" width="180" bordercolor="#999999">
	<tr valign="top">
		<td align="left" valign="middle" bgcolor="#EEEEEE">店舗名：<b>
			<span id="tenpo_name">{if $paramarray.TenpoNm != $shop.M05_TENPO_NAME}{$paramarray.TenpoNm}{else}{$shop.M05_TENPO_NAME}{/if}</span>
		</b></td>
	</tr>
</table>
<br />
<input type="button" value="　　確　　定　　" onclick="SendValue('{$paramarray.TenpoNm}');" style="font-weight:bold;">
</form>
</center>
</body>
</html>